'''
Created on Jun 10, 2012

@author: thomas_dao
'''

from web import base
from web.base import BaseHandler
from web import urls
from web import util
import json
import logging
from google.appengine.ext import ndb
from app.query import feed_async 
    
class CreateHandler(BaseHandler):
    def post(self):
        pass
    

class ReadHandler(BaseHandler):
    @ndb.synctasklet
    @base.user_required
    def get(self):
        page = yield feed_async.get_feeds(util.get_current_user_key())
        self.response.write(json.dumps(page))
    

class UpdateHandler(BaseHandler):
    def post(self):
        pass
    

class DeleteHandler(BaseHandler):
    def post(self):
        pass    

app = urls.app

def main():
    app.run()

if __name__ == '__main__':
    main()